﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace BillingSystem
{
    public partial class FormPutMoney : Form
    {
        public FormPutMoney()
        {
            InitializeComponent();
        }

        /// <summary> Показ диалога </summary>
        public int ShowForm()
        {
            int s;
            if (this.ShowDialog() == DialogResult.OK)
            {
                if (maskedTextBoxSum.Text == "")
                {
                    return 0;
                }
                try
                {
                    s = Int32.Parse(maskedTextBoxSum.Text);
                }
                catch (FormatException exc)
                {
                    MessageBox.Show("Ошибка ввода");
                    return 0;
                }
                return s;
            }
            return 0;
        }
    }
}
